package sctu.edu.java.year2016.team03.huzhou.textwork.day20160530.Fly;

import java.util.*;

/**
 * Created by Administrator on 2016/5/30.
 */
public class Client {
    public static void main(String[] args) {

        Person song=new Person();//实例化一个song对象
        song.fly();//对象方法

        Fly Amy=new Dog();//利用实现该接口的类来实例化对象
        Amy.fly();//对象方法

        //List接口的常用方法；
        List<Person> newListPerson=new ArrayList<>();
        newListPerson.add(song);
        newListPerson.add(new Person());
        newListPerson.add(new Person());
        System.out.println(newListPerson.size());

        //Map接口的常用方法；
        Map<String, Person>map=new HashMap<>();
        map.put("chen", song);
        map.put("chen", song);
        map.put("hu", song);
        System.out.println("Map's size is:" + map.size());
        System.out.println("Map's keySet is: "+map.keySet());
        //System.out.println(map);

        //Set接口的常用方法；
        Set<Person> newSetPerson=new HashSet<>();
        newSetPerson.add(song);
        newSetPerson.add(new Person());
        System.out.println("The newSetPerson's size is :" + newSetPerson.size());
        //System.out.println(newSetPerson);


    }
}
